.class Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;
.super Ljava/lang/Object;
.source "RemoteSynchronizer.java"

# interfaces
.implements Les/y80;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->y()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Ljava/lang/String;

.field final synthetic b:Lcom/estrongs/fs/g;

.field final synthetic c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;


# direct methods
.method constructor <init>(Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;Ljava/lang/String;Lcom/estrongs/fs/g;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    iput-object p2, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->a:Ljava/lang/String;

    iput-object p3, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->b:Lcom/estrongs/fs/g;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Les/s80;Z)V
    .locals 8

    .line 1
    invoke-virtual {p1}, Les/s80;->m()I

    move-result p1

    const/4 p2, 0x4

    if-ne p1, p2, :cond_a

    .line 2
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object p1

    iget-object p2, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    iget-object p2, p2, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->D:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    iget-object p2, p2, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    const/4 v0, 0x0

    invoke-virtual {p1, p2, v0, v0}, Lcom/estrongs/fs/f;->a(Ljava/lang/String;ZZ)Lcom/estrongs/fs/g;

    move-result-object p1

    if-nez p1, :cond_0

    .line 3
    iget-object p1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->C()V

    return-void

    .line 4
    :cond_0
    invoke-interface {p1}, Lcom/estrongs/fs/g;->lastModified()J

    move-result-wide v1

    iget-object p2, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    invoke-static {p2}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->a(Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;)J

    move-result-wide v3

    cmp-long p2, v1, v3

    if-nez p2, :cond_9

    invoke-interface {p1}, Lcom/estrongs/fs/g;->length()J

    move-result-wide v1

    iget-object p2, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    invoke-static {p2}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->b(Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;)J

    move-result-wide v3

    cmp-long p2, v1, v3

    if-eqz p2, :cond_1

    goto/16 :goto_4

    .line 5
    :cond_1
    :try_start_0
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-interface {p1}, Lcom/estrongs/fs/g;->getPath()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/estrongs/android/util/h0;->M(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-interface {p1}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, ".old"

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->a:Ljava/lang/String;

    if-nez v1, :cond_2

    const-string v1, ""

    goto :goto_0

    :cond_2
    iget-object v1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->a:Ljava/lang/String;

    :goto_0
    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    .line 6
    invoke-static {p2}, Lcom/estrongs/fs/util/f;->j(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    .line 7
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v1

    invoke-static {p2}, Lcom/estrongs/android/util/h0;->y(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, p1, v2, v0}, Lcom/estrongs/fs/f;->b(Lcom/estrongs/fs/g;Ljava/lang/String;Z)Z

    move-result v1

    if-eqz v1, :cond_b

    .line 8
    iget-object v1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    const/4 v2, 0x1

    invoke-static {v1, v2}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->a(Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;Z)Z

    .line 9
    iget-object v1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->D:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    invoke-static {v1}, Lcom/estrongs/android/util/h0;->H1(Ljava/lang/String;)Z

    move-result v1

    const-wide/16 v2, 0x3e8

    if-nez v1, :cond_4

    iget-object v1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->D:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    invoke-static {v1}, Lcom/estrongs/android/util/h0;->M1(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_4

    iget-object v1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->D:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    invoke-static {v1}, Lcom/estrongs/android/util/h0;->B2(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_3

    goto :goto_1

    .line 10
    :cond_3
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v1

    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v4

    iget-object v5, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    iget-object v5, v5, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->D:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    iget-object v5, v5, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->tmpPath:Ljava/lang/String;

    invoke-virtual {v4, v5}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object v4

    invoke-interface {p1}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v1, v4, v5, v0}, Lcom/estrongs/fs/f;->b(Lcom/estrongs/fs/g;Ljava/lang/String;Z)Z

    move-result v1
    :try_end_0
    .catch Lcom/estrongs/fs/FileSystemException; {:try_start_0 .. :try_end_0} :catch_2

    goto :goto_3

    :cond_4
    :goto_1
    const/4 v1, 0x0

    const/4 v4, 0x0

    :goto_2
    const/4 v5, 0x5

    if-ge v4, v5, :cond_5

    if-nez v1, :cond_5

    .line 11
    :try_start_1
    invoke-static {v2, v3}, Ljava/lang/Thread;->sleep(J)V

    add-int/lit8 v4, v4, 0x1

    .line 12
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v5

    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v6

    iget-object v7, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    iget-object v7, v7, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->D:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    iget-object v7, v7, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->tmpPath:Ljava/lang/String;

    invoke-virtual {v6, v7}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object v6

    invoke-interface {p1}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v5, v6, v7, v0}, Lcom/estrongs/fs/f;->b(Lcom/estrongs/fs/g;Ljava/lang/String;Z)Z

    move-result v1
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_2

    :catch_0
    nop

    goto :goto_2

    :cond_5
    :goto_3
    if-eqz v1, :cond_b

    .line 13
    :try_start_2
    iget-object v1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->D:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    invoke-static {v1}, Lcom/estrongs/android/util/h0;->H1(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_6

    iget-object v1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->D:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    invoke-static {v1}, Lcom/estrongs/android/util/h0;->M1(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_6

    iget-object v1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->D:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->path:Ljava/lang/String;

    invoke-static {v1}, Lcom/estrongs/android/util/h0;->B2(Ljava/lang/String;)Z

    move-result v1
    :try_end_2
    .catch Lcom/estrongs/fs/FileSystemException; {:try_start_2 .. :try_end_2} :catch_2

    if-eqz v1, :cond_7

    .line 14
    :cond_6
    :try_start_3
    invoke-static {v2, v3}, Ljava/lang/Thread;->sleep(J)V
    :try_end_3
    .catch Ljava/lang/InterruptedException; {:try_start_3 .. :try_end_3} :catch_1
    .catch Lcom/estrongs/fs/FileSystemException; {:try_start_3 .. :try_end_3} :catch_2

    .line 15
    :catch_1
    :cond_7
    :try_start_4
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v1

    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v2

    invoke-virtual {v2, p2}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object p2

    invoke-virtual {v1, p2}, Lcom/estrongs/fs/f;->a(Lcom/estrongs/fs/g;)Z

    .line 16
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object p2

    invoke-interface {p1}, Lcom/estrongs/fs/g;->getPath()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1, v0, v0}, Lcom/estrongs/fs/f;->a(Ljava/lang/String;ZZ)Lcom/estrongs/fs/g;

    move-result-object p2

    .line 17
    sget-object v0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->c:Ljava/util/Map;

    monitor-enter v0
    :try_end_4
    .catch Lcom/estrongs/fs/FileSystemException; {:try_start_4 .. :try_end_4} :catch_2

    .line 18
    :try_start_5
    sget-object v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->c:Ljava/util/Map;

    invoke-interface {p1}, Lcom/estrongs/fs/g;->getPath()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/estrongs/android/pop/view/utils/b;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    invoke-interface {v1, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    if-eqz p2, :cond_8

    if-eqz p1, :cond_8

    .line 19
    invoke-interface {p2}, Lcom/estrongs/fs/g;->lastModified()J

    move-result-wide v1

    iput-wide v1, p1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->lastModified:J

    .line 20
    invoke-interface {p2}, Lcom/estrongs/fs/g;->length()J

    move-result-wide v1

    iput-wide v1, p1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->size:J

    .line 21
    new-instance p2, Ljava/io/File;

    iget-object v1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->D:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;

    iget-object v1, v1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->cachePath:Ljava/lang/String;

    invoke-direct {p2, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {p2}, Ljava/io/File;->lastModified()J

    move-result-wide v1

    iput-wide v1, p1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->localFileLastModified:J

    .line 22
    invoke-static {}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer;->e()V

    :cond_8
    const/4 p2, 0x0

    .line 23
    iput-object p2, p1, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$RemoteFile;->tmpPath:Ljava/lang/String;

    .line 24
    monitor-exit v0

    goto :goto_5

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0

    :try_start_6
    throw p1
    :try_end_6
    .catch Lcom/estrongs/fs/FileSystemException; {:try_start_6 .. :try_end_6} :catch_2

    :catch_2
    move-exception p1

    .line 25
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_5

    .line 26
    :cond_9
    :goto_4
    iget-object p1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->C()V

    return-void

    .line 27
    :cond_a
    iget-object p1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->C()V

    .line 28
    :cond_b
    :goto_5
    iget-object p1, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->c:Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;

    invoke-static {p1}, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;->c(Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c;)Z

    move-result p1

    if-eqz p1, :cond_c

    .line 29
    invoke-static {}, Les/p10;->e()Les/p10;

    move-result-object p1

    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v0, p0, Lcom/estrongs/android/pop/view/utils/RemoteSynchronizer$c$a;->b:Lcom/estrongs/fs/g;

    invoke-interface {v0}, Lcom/estrongs/fs/g;->getPath()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/estrongs/android/util/h0;->M(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "*"

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Les/p10;->a(Ljava/lang/String;)V

    :cond_c
    return-void
.end method
